package view;

import java.awt.Graphics;
import java.awt.Image;
import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import javax.swing.JPanel;
import client.Client;

public class ChessOnlineView extends JPanel implements IChessOnlineView{
	/**
	 * 
	 */
	private static final long serialVersionUID = 4823816098502814709L;
	
	protected Client mMainScreen;
	private Image mBackground = null;
	
	public ChessOnlineView(Client mainScreen) {
		this.mMainScreen = mainScreen;
	
		try {
			mBackground = ImageIO.read(new File("Resources/Images/ViewBG.jpg"));
			
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void onShow() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void onHide() {
		// TODO Auto-generated method stub
		
	}
	
	@Override
	protected void paintComponent(Graphics g) {
		super.paintComponent(g);
		g.drawImage(mBackground, 0, 0, null);
	}
}
